<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>科目编辑</title>
	<!-- import css and js --> 
	<%@ include file="/common/metaInput.jsp" %>  
	<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
<script type="text/javascript">
var basic_Url="${ctx}/basic/subjects";
$(function(){
$("#inputForm").validate({			   
	onsubmit: true,
	 /*执行ajaxsubmit  */ 
    submitHandler: function(editform) {
            
        //alert(jsonInfo); 
        try{			    		
            url =  basic_Url+"/save.do";
            var api = frameElement.api;
        	var W = api.opener;
            getReturnMessage(url,"inputForm",W.searchAP);	
        }catch(e){alert(e);}
    }
 }
);

	 $("#zd004Categoryname").val("${basicSubjects.zd002Name}");
	 $("#zd003CategoryId").val("${basicSubjects.id}");
});
function submitForm(param){
	//$("#harborname").val($("#harbor").find("option:selected").text());
	//$("#harborid").val($("#harbor").val());
	jQuery.ajaxSettings.async = false;
  	$("#submitFlag").val(param);
    $("#inputForm").submit();
 }		

$(function(){
	$("#zd002Name").change(function(){
		$("#bizMnemonic").val(helpCode($("#zd002Name").val()))
	});
});
</script>

</head>

<body>

<form id="inputForm" action="" method="post">
<input type="hidden" id="id" name="id" value="${basicSubjectsDO.id}"/>
<!-- 用于标识提交按钮 -->
<input type="hidden" id="submitFlag" value="" />
 <div class="pageContent" >
    <div class="panel">
         <table class="TableBlock" align="center">
         			<c:if test="${not empty basicSubjectsDO.zd001Code}">
         				 <tr>
   		                 <td>科目编码:</td>
   		                 <td><input id="zd001Code" disabled="disabled" name="zd001Code" style="width: 200px;"  value="${basicSubjectsDO.zd001Code}" /></td>
   		              </tr>
         			</c:if>
         			
                   <tr>
                    <td>科目名称:</td>
   		                 <td>
   		                <input type="text" id="zd002Name" style="width: 200px;" name="zd002Name" class="required" value="${basicSubjectsDO.zd002Name}" />
   		                 </td>
   		           </tr>
   		               <tr>
   		           		<td>助记码:</td>
   		           		<td><input id="bizMnemonic" name="bizMnemonic"  style="width: 200px;" value="${basicSubjectsDO.bizMnemonic}" /></td>
   		           	</tr>
   		               <tr>
   		                 <td>类别:</td>
   		                 <td><input id="zd004Categoryname" name="zd004Categoryname" disabled="disabled" style="width: 200px;"  value="" />
   		                 <input id="zd003CategoryId" name="zd003CategoryId" type="hidden"  value="${basicSubjectsDO.zd003CategoryId}" /></td>	
   		              </tr>	
                   <tr>
   		                 <td>编号位数:</td>
   		                 <td><input id="zd004Munber" name="zd004Munber" style="width: 200px;"  value="${basicSubjectsDO.zd004Munber}" /></td>
   		           </tr>
                </table>               
         </div>
         <div class="formBar">
	        <ul>
		       <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="save" onclick="submitForm(1)">保存</button></div></div></li>
		       <li><div class="button"><div class="buttonContent"><button type="button" class="print" onclick="CloseDialog()">关闭</button></div></div></li>
	        </ul>
        </div>    
    </div>
</form>
</body>
</html>
